//
//  UITableViewCell+OACellProtocol.m
//  OASDK_Works
//
//  Created by ChenJie on 5/23/20.
//  Copyright © 2020 Mist. All rights reserved.
//

#import "UITableViewCell+OACellProtocol.h"
#import <objc/runtime.h>

@implementation UITableViewCell (OACellProtocol)

/* Property: oa_topSeparator */
- (UIView *)oa_topSeparator {
    UIView *_separator = objc_getAssociatedObject(self, _cmd);
    if (!_separator) {
        _separator = [UIView new];
        objc_setAssociatedObject(self, _cmd, _separator, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
        [self addSubview:_separator];
    }
    return _separator;
}

/* Property: oa_bottomSeparator */
- (UIView *)oa_bottomSeparator {
    UIView *_separator = objc_getAssociatedObject(self, _cmd);
    if (!_separator) {
        _separator = [UIView new];
        objc_setAssociatedObject(self, _cmd, _separator, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
        [self addSubview:_separator];
    }
    return _separator;
}

@end
